/*
 * Copyright (c) 2013-2015 Charkey. All rights reserved.
 *
 * This software is the confidential and proprietary information of Charkey.
 * You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the agreements you entered into with Charkey.
 *
 * Charkey MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
 *
 * Charkey SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */

package cn.simastudio.talos.core.service.base;

import cn.simastudio.talos.core.model.base.Resource;

import java.util.List;
import java.util.Set;

/**
 * 资源\菜单服务类
 */
public interface ResourceService {

    /**
     * 通过用户名查找用户权限
     *
     * @param username 用户名
     * @return 权限集（字符串集）
     */
    Set<String> getPermissions(String username);

    Resource createResource(Resource resource);

    boolean updateResource(Resource resource);

    boolean deleteResource(Integer resId);

    Resource getResource(Integer resId);

    List<Resource> getAllResources();
}
